//
//  UILabel+TapAction.h
//  CoreText
//
//  Created by poweruser on 2017/7/12.
//  Copyright © 2017年 poweruser. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol AttributeTapActionDelegate <NSObject>

- (void)attributeTapReturnString:(NSString *)string
                              range:(NSRange)range
                              index:(NSInteger)index;

@end


@interface AttributeModel : NSObject

@property (nonatomic, copy) NSString *str;

@property (nonatomic, assign) NSRange range;

@end


@interface UILabel (TapAction)

@property (nonatomic, assign) BOOL enabledTapEffect;


//- (void)addAttributeTapActionWithStrings:(NSArray <NSString *> *)strings
//                                 tapClicked:(void (^) (NSString *string , NSRange range , NSInteger index))tapClick;

/**
 *  给文本添加点击事件delegate回调
 *
 *  @param strings
 *  @param delegate delegate
 */
- (void)addAttributeTapActionWithStrings:(NSString *)strings
                                delegate:(id <AttributeTapActionDelegate> )delegate;

@end
